laravel eloquent get first

35

$user = User::where('mobile', Input::get('mobile'))->get();

if (!$user->isEmpty()){
    $firstUser = $user->first()
}

Comments

Submit
0 Comments